<!DOCTYPE html>
<html lang="zh-CN">
    <head>
        <meta charset="UTF-8" />
        <meta name="viewport" content="width=device-width, initial-scale=1.0" />
        <title>孕育宝典 - 经期数据统计</title>
        <link href="https://cdn.jsdelivr.net/npm/tailwindcss@2.2.19/dist/tailwind.min.css" rel="stylesheet" />
        <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css" />
        <style>
            body {
                font-family: 'PingFang SC', 'Microsoft YaHei', sans-serif;
                background-color: #f5f5f5;
                color: #333333;
                margin: 0;
                padding: 0;
            }
            .device-container {
                width: 390px;
                height: 844px;
                overflow: hidden;
                position: relative;
                background-color: #ffffff;
            }
            .status-bar {
                height: 44px;
                background-color: #ffffff;
                display: flex;
                justify-content: space-between;
                align-items: center;
                padding: 0 20px;
                font-size: 14px;
                font-weight: 600;
            }
            .header {
                background-color: #ffffff;
                padding: 12px 16px 8px;
                display: flex;
                justify-content: space-between;
                align-items: center;
                border-bottom: 1px solid #f0f0f0;
            }
            .nav-bar {
                height: 60px;
                background-color: #ffffff;
                position: absolute;
                bottom: 0;
                width: 100%;
                display: flex;
                justify-content: space-around;
                align-items: center;
                border-top: 1px solid #f0f0f0;
            }
            .nav-item {
                display: flex;
                flex-direction: column;
                align-items: center;
                color: #666666;
                font-size: 10px;
            }
            .nav-item.active {
                color: #ff9fb5;
            }
            .main-content {
                height: calc(844px - 44px - 60px - 56px);
                overflow-y: auto;
                padding: 16px;
                background-color: #f9f9f9;
            }
            .card {
                background-color: #ffffff;
                border-radius: 12px;
                padding: 16px;
                box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
                margin-bottom: 16px;
            }
            .card-title {
                font-size: 16px;
                font-weight: 600;
                color: #333;
                margin-bottom: 12px;
                display: flex;
                align-items: center;
            }
            .card-title i {
                margin-right: 8px;
                color: #ff9fb5;
            }
            .filter-tabs {
                display: flex;
                background-color: #f0f0f0;
                border-radius: 20px;
                padding: 4px;
                margin-bottom: 16px;
            }
            .filter-tab {
                flex: 1;
                text-align: center;
                padding: 6px 12px;
                font-size: 13px;
                color: #666;
                border-radius: 16px;
                cursor: pointer;
                transition: all 0.2s ease;
            }
            .filter-tab.active {
                background-color: #fff;
                color: #ff9fb5;
                box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
            }
            .stat-item {
                display: flex;
                align-items: center;
                padding: 12px 0;
                border-bottom: 1px solid #f0f0f0;
            }
            .stat-item:last-child {
                border-bottom: none;
                padding-bottom: 0;
            }
            .stat-icon {
                width: 40px;
                height: 40px;
                border-radius: 20px;
                background-color: #fff0f3;
                display: flex;
                align-items: center;
                justify-content: center;
                margin-right: 12px;
                color: #ff9fb5;
                font-size: 18px;
            }
            .stat-content {
                flex: 1;
            }
            .stat-label {
                font-size: 14px;
                color: #666;
                margin-bottom: 4px;
            }
            .stat-value {
                font-size: 18px;
                font-weight: 600;
                color: #333;
            }
            .stat-desc {
                font-size: 12px;
                color: #999;
                margin-top: 2px;
            }
            .chart-container {
                height: 200px;
                background-color: #f9f9f9;
                border-radius: 8px;
                margin: 12px 0;
                position: relative;
                overflow: hidden;
            }
            .stats-grid {
                display: grid;
                grid-template-columns: 1fr 1fr;
                gap: 12px;
                margin-bottom: 12px;
            }
            .stats-grid-item {
                background-color: #f9f9f9;
                border-radius: 8px;
                padding: 12px;
                text-align: center;
            }
            .grid-item-value {
                font-size: 20px;
                font-weight: 600;
                color: #333;
                margin-bottom: 4px;
            }
            .grid-item-label {
                font-size: 12px;
                color: #666;
            }
            .chart-y-axis {
                position: absolute;
                top: 10px;
                left: 0;
                bottom: 30px;
                width: 40px;
                display: flex;
                flex-direction: column;
                justify-content: space-between;
                font-size: 10px;
                color: #999;
                text-align: right;
                padding-right: 8px;
            }
            .chart-x-axis {
                position: absolute;
                bottom: 0;
                left: 40px;
                right: 10px;
                height: 30px;
                display: flex;
                justify-content: space-between;
                font-size: 10px;
                color: #999;
                padding-top: 8px;
            }
            .chart-grid {
                position: absolute;
                top: 10px;
                left: 40px;
                right: 10px;
                bottom: 30px;
                display: flex;
                flex-direction: column;
                justify-content: space-between;
            }
            .chart-grid-line {
                width: 100%;
                height: 1px;
                background-color: rgba(0, 0, 0, 0.05);
            }
            .chart-content {
                position: absolute;
                top: 10px;
                left: 40px;
                right: 10px;
                bottom: 30px;
            }
            .chart-line {
                position: relative;
                height: 100%;
            }
            .chart-dot {
                position: absolute;
                width: 8px;
                height: 8px;
                border-radius: 50%;
                background-color: #ff9fb5;
                transform: translate(-50%, -50%);
            }
            .chart-dot.abnormal {
                background-color: #f97316;
            }
            .chart-line-segment {
                position: absolute;
                height: 2px;
                background-color: #ff9fb5;
                transform-origin: left center;
            }
            .chart-avg-line {
                position: absolute;
                width: 100%;
                height: 1px;
                background-color: rgba(255, 159, 181, 0.3);
                border-top: 1px dashed #ff9fb5;
            }
            .chart-avg-label {
                position: absolute;
                right: 0;
                padding: 2px 4px;
                font-size: 10px;
                color: #ff9fb5;
                background-color: rgba(255, 159, 181, 0.1);
                border-radius: 2px;
                transform: translateY(-50%);
            }
            .chart-bar {
                position: absolute;
                bottom: 0;
                width: 20px;
                border-radius: 4px 4px 0 0;
                background-color: #ff9fb5;
                transform: translateX(-50%);
            }
            .chart-bar-label {
                position: absolute;
                bottom: -20px;
                font-size: 10px;
                color: #666;
                text-align: center;
                transform: translateX(-50%);
            }
            .chart-bar.highlight {
                background-color: #f97316;
            }
            .chart-marker {
                position: absolute;
                font-size: 10px;
                color: #f97316;
                transform: translate(-50%, -100%);
                padding: 2px 4px;
            }
            .radar-chart {
                position: relative;
                width: 100%;
                height: 100%;
            }
            .radar-circle {
                position: absolute;
                top: 50%;
                left: 50%;
                border: 1px dashed rgba(0, 0, 0, 0.1);
                border-radius: 50%;
                transform: translate(-50%, -50%);
            }
            .radar-axis {
                position: absolute;
                top: 50%;
                left: 50%;
                width: 50%;
                height: 1px;
                background-color: rgba(0, 0, 0, 0.1);
                transform-origin: left center;
            }
            .radar-label {
                position: absolute;
                font-size: 10px;
                color: #666;
                white-space: nowrap;
            }
            .radar-value {
                position: absolute;
                width: 50%;
                height: 1px;
                background-color: rgba(255, 159, 181, 0.5);
                transform-origin: left center;
            }
            .radar-value::after {
                content: '';
                position: absolute;
                right: -4px;
                top: -4px;
                width: 8px;
                height: 8px;
                background-color: #ff9fb5;
                border-radius: 50%;
            }
            .radar-area {
                position: absolute;
                top: 50%;
                left: 50%;
                width: 170px;
                height: 170px;
                transform: translate(-50%, -50%);
                clip-path: polygon(50% 0%, 100% 38%, 82% 100%, 18% 100%, 0% 38%);
                background-color: rgba(255, 159, 181, 0.1);
                border: 2px solid rgba(255, 159, 181, 0.5);
            }
        </style>
    </head>
    <body>
        <div class="device-container">
            <!-- iOS状态栏 -->
            <div class="status-bar">
                <span>9:41</span>
                <div class="flex items-center">
                    <i class="fas fa-signal mr-1"></i>
                    <i class="fas fa-wifi mr-1"></i>
                    <i class="fas fa-battery-full"></i>
                </div>
            </div>

            <!-- 页面头部 -->
            <div class="header">
                <div class="flex items-center">
                    <i class="fas fa-arrow-left mr-4"></i>
                    <h1 class="text-lg font-medium">经期数据统计</h1>
                </div>
                <div class="flex gap-3">
                    <i class="fas fa-share-alt"></i>
                    <i class="fas fa-ellipsis-h"></i>
                </div>
            </div>

            <!-- 主内容区 -->
            <div class="main-content">
                <!-- 时间范围筛选 -->
                <div class="filter-tabs">
                    <div class="filter-tab">3个月</div>
                    <div class="filter-tab active">6个月</div>
                    <div class="filter-tab">12个月</div>
                    <div class="filter-tab">全部</div>
                </div>

                <!-- 周期概览卡片 -->
                <div class="card">
                    <div class="card-title">
                        <i class="fas fa-chart-line"></i>
                        <span>周期概览</span>
                    </div>

                    <div class="stats-grid">
                        <div class="stats-grid-item">
                            <div class="grid-item-value">28.3</div>
                            <div class="grid-item-label">平均周期长度(天)</div>
                        </div>
                        <div class="stats-grid-item">
                            <div class="grid-item-value">5.2</div>
                            <div class="grid-item-label">平均经期长度(天)</div>
                        </div>
                        <div class="stats-grid-item">
                            <div class="grid-item-value">92%</div>
                            <div class="grid-item-label">规律性评分</div>
                        </div>
                        <div class="stats-grid-item">
                            <div class="grid-item-value">96%</div>
                            <div class="grid-item-label">预测准确度</div>
                        </div>
                    </div>

                    <div class="stat-item">
                        <div class="stat-icon">
                            <i class="fas fa-calendar-check"></i>
                        </div>
                        <div class="stat-content">
                            <div class="stat-label">当前周期状态</div>
                            <div class="stat-value">安全期</div>
                            <div class="stat-desc">预计下次月经: 2023-07-28 (还有8天)</div>
                        </div>
                    </div>
                </div>

                <!-- 周期长度趋势 -->
                <div class="card">
                    <div class="card-title">
                        <i class="fas fa-chart-area"></i>
                        <span>周期长度趋势</span>
                    </div>
                    <div class="chart-container">
                        <div class="chart-y-axis">
                            <div>35</div>
                            <div>30</div>
                            <div>25</div>
                            <div>20</div>
                        </div>
                        <div class="chart-x-axis">
                            <div>2月</div>
                            <div>3月</div>
                            <div>4月</div>
                            <div>5月</div>
                            <div>6月</div>
                            <div>7月</div>
                        </div>
                        <div class="chart-grid">
                            <div class="chart-grid-line"></div>
                            <div class="chart-grid-line"></div>
                            <div class="chart-grid-line"></div>
                            <div class="chart-grid-line"></div>
                        </div>
                        <div class="chart-content">
                            <div class="chart-avg-line" style="top: 33.3%">
                                <div class="chart-avg-label">平均: 28.3天</div>
                            </div>
                            <div class="chart-line">
                                <!-- 周期点和连线 -->
                                <div class="chart-dot" style="left: 10%; top: 33.3%"></div>
                                <div
                                    class="chart-line-segment"
                                    style="left: 10%; width: 10%; top: 33.3%; transform: rotate(0deg)"
                                ></div>

                                <div class="chart-dot" style="left: 20%; top: 33.3%"></div>
                                <div
                                    class="chart-line-segment"
                                    style="left: 20%; width: 10%; top: 33.3%; transform: rotate(-10deg)"
                                ></div>

                                <div class="chart-dot" style="left: 30%; top: 40%"></div>
                                <div
                                    class="chart-line-segment"
                                    style="left: 30%; width: 10%; top: 40%; transform: rotate(25deg)"
                                ></div>

                                <div class="chart-dot abnormal" style="left: 40%; top: 20%"></div>
                                <div
                                    class="chart-line-segment"
                                    style="left: 40%; width: 10%; top: 20%; transform: rotate(0deg)"
                                ></div>

                                <div class="chart-dot" style="left: 50%; top: 20%"></div>
                                <div
                                    class="chart-line-segment"
                                    style="left: 50%; width: 10%; top: 20%; transform: rotate(-7deg)"
                                ></div>

                                <div class="chart-dot" style="left: 60%; top: 25%"></div>
                                <div
                                    class="chart-line-segment"
                                    style="left: 60%; width: 10%; top: 25%; transform: rotate(-5deg)"
                                ></div>

                                <div class="chart-dot" style="left: 70%; top: 30%"></div>
                                <div
                                    class="chart-line-segment"
                                    style="left: 70%; width: 10%; top: 30%; transform: rotate(0deg)"
                                ></div>

                                <div class="chart-dot" style="left: 80%; top: 30%"></div>
                                <div class="chart-marker" style="left: 40%; top: 15%">
                                    周期异常 <i class="fas fa-exclamation-circle"></i>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="text-center text-xs text-gray-500 mt-2">显示最近6个月的周期长度变化趋势</div>
                </div>

                <!-- 经期长度统计 -->
                <div class="card">
                    <div class="card-title">
                        <i class="fas fa-calendar-day"></i>
                        <span>经期长度统计</span>
                    </div>
                    <div class="chart-container">
                        <div class="chart-y-axis">
                            <div>6</div>
                            <div>4</div>
                            <div>2</div>
                            <div>0</div>
                        </div>
                        <div class="chart-x-axis">
                            <div>3天</div>
                            <div>4天</div>
                            <div>5天</div>
                            <div>6天</div>
                            <div>7天</div>
                        </div>
                        <div class="chart-grid">
                            <div class="chart-grid-line"></div>
                            <div class="chart-grid-line"></div>
                            <div class="chart-grid-line"></div>
                            <div class="chart-grid-line"></div>
                        </div>
                        <div class="chart-content">
                            <!-- 柱状图 -->
                            <div class="chart-bar" style="left: 12.5%; height: 20%; background-color: #ffcdd2">
                                <div class="chart-bar-label">3天</div>
                            </div>
                            <div class="chart-bar" style="left: 32.5%; height: 40%">
                                <div class="chart-bar-label">4天</div>
                            </div>
                            <div class="chart-bar highlight" style="left: 52.5%; height: 80%">
                                <div class="chart-bar-label">5天</div>
                            </div>
                            <div class="chart-bar" style="left: 72.5%; height: 30%">
                                <div class="chart-bar-label">6天</div>
                            </div>
                            <div class="chart-bar" style="left: 92.5%; height: 10%; background-color: #ffcdd2">
                                <div class="chart-bar-label">7天</div>
                            </div>
                        </div>
                    </div>
                    <div class="text-center text-xs text-gray-500 mt-2">您的经期平均持续5.2天，属于正常范围</div>
                </div>

                <!-- 症状频率分析 -->
                <div class="card">
                    <div class="card-title">
                        <i class="fas fa-thermometer-half"></i>
                        <span>症状频率分析</span>
                    </div>
                    <div class="chart-container">
                        <div class="radar-chart">
                            <div class="radar-circle" style="width: 40px; height: 40px"></div>
                            <div class="radar-circle" style="width: 80px; height: 80px"></div>
                            <div class="radar-circle" style="width: 120px; height: 120px"></div>
                            <div class="radar-circle" style="width: 160px; height: 160px"></div>

                            <div class="radar-axis" style="transform: translate(-50%, -50%) rotate(0deg)">
                                <div class="radar-label" style="right: -5px; transform: translateX(100%)">经痛</div>
                            </div>
                            <div class="radar-axis" style="transform: translate(-50%, -50%) rotate(72deg)">
                                <div
                                    class="radar-label"
                                    style="right: -5px; transform: translateX(100%) rotate(-72deg)"
                                >
                                    乳房胀痛
                                </div>
                            </div>
                            <div class="radar-axis" style="transform: translate(-50%, -50%) rotate(144deg)">
                                <div
                                    class="radar-label"
                                    style="right: -5px; transform: translateX(100%) rotate(-144deg)"
                                >
                                    情绪波动
                                </div>
                            </div>
                            <div class="radar-axis" style="transform: translate(-50%, -50%) rotate(216deg)">
                                <div
                                    class="radar-label"
                                    style="right: -5px; transform: translateX(100%) rotate(-216deg)"
                                >
                                    腰痛
                                </div>
                            </div>
                            <div class="radar-axis" style="transform: translate(-50%, -50%) rotate(288deg)">
                                <div
                                    class="radar-label"
                                    style="right: -5px; transform: translateX(100%) rotate(-288deg)"
                                >
                                    疲劳
                                </div>
                            </div>

                            <div
                                class="radar-value"
                                style="transform: translate(-50%, -50%) rotate(0deg); width: 85%"
                            ></div>
                            <div
                                class="radar-value"
                                style="transform: translate(-50%, -50%) rotate(72deg); width: 65%"
                            ></div>
                            <div
                                class="radar-value"
                                style="transform: translate(-50%, -50%) rotate(144deg); width: 70%"
                            ></div>
                            <div
                                class="radar-value"
                                style="transform: translate(-50%, -50%) rotate(216deg); width: 45%"
                            ></div>
                            <div
                                class="radar-value"
                                style="transform: translate(-50%, -50%) rotate(288deg); width: 60%"
                            ></div>

                            <div class="radar-area"></div>
                        </div>
                    </div>
                    <div class="text-center text-xs text-gray-500 mt-2">经痛是您最常见的症状，出现在85%的周期中</div>
                </div>

                <!-- 健康建议 -->
                <div class="card">
                    <div class="card-title">
                        <i class="fas fa-heartbeat"></i>
                        <span>健康洞察</span>
                    </div>
                    <div class="p-3 bg-blue-50 rounded-lg mb-3">
                        <div class="font-medium text-blue-800 mb-1">您的周期非常规律</div>
                        <div class="text-sm text-blue-600">
                            周期长度的标准偏差仅为±1.2天，这表明您的月经周期非常规律，有助于更准确地预测排卵期。
                        </div>
                    </div>
                    <div class="p-3 bg-green-50 rounded-lg">
                        <div class="font-medium text-green-800 mb-1">适合开始备孕计划</div>
                        <div class="text-sm text-green-600">
                            规律的月经周期表明您的激素水平相对稳定，这对于备孕是一个有利条件。
                        </div>
                    </div>
                </div>
            </div>

            <!-- 底部导航栏 -->
            <div class="nav-bar">
                <div class="nav-item">
                    <i class="fas fa-home text-xl mb-1"></i>
                    <span>首页</span>
                </div>
                <div class="nav-item active">
                    <i class="fas fa-notes-medical text-xl mb-1"></i>
                    <span>记录</span>
                </div>
                <div class="nav-item">
                    <i class="fas fa-book-medical text-xl mb-1"></i>
                    <span>知识库</span>
                </div>
                <div class="nav-item">
                    <i class="fas fa-user-friends text-xl mb-1"></i>
                    <span>伴侣空间</span>
                </div>
                <div class="nav-item">
                    <i class="fas fa-user text-xl mb-1"></i>
                    <span>我的</span>
                </div>
            </div>
        </div>
    </body>
</html>
